package com.cskaoyan.mall.bean.bean_of_liuxufeng;

import com.cskaoyan.mall.utils.TypeConverter;
import lombok.AllArgsConstructor;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.util.Date;
@NoArgsConstructor
@AllArgsConstructor
public class Coupon {
    private Integer id;
    private String name;
    private String desc;
    private String tag;
    private Integer total;
    private BigDecimal discount;
    private BigDecimal min;
    private Short limit;
    private Short type;
    private Short status;
    private Short goodsType;
    private String goodsValue;
    private String code;
    private Short timeType;
    private Short days;
    private Date startTime;
    private Date endTime;
    private Date addTime;
    private Date updateTime;
    private Boolean deleted;

    public Coupon(CouponList2StringBo couponBo) {
        this.id = couponBo.getId();
        this.name = couponBo.getName();
        this.desc = couponBo.getDesc();
        this.tag = couponBo.getTag();
        this.total = couponBo.getTotal();
        this.discount = couponBo.getDiscount();
        this.min = couponBo.getMin();
        this.limit = couponBo.getLimit();
        this.type = couponBo.getType();
        this.status = couponBo.getStatus();
        this.goodsType = couponBo.getGoodsType();
        this.goodsValue = TypeConverter.parse(couponBo.getGoodsValue());
        this.code = couponBo.getCode();
        this.timeType = couponBo.getTimeType();
        this.days = couponBo.getDays();
        this.startTime = couponBo.getStartTime();
        this.endTime = couponBo.getEndTime();
        this.addTime = couponBo.getAddTime();
        this.updateTime = couponBo.getUpdateTime();
        this.deleted = couponBo.getDeleted();
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name == null ? null : name.trim();
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc == null ? null : desc.trim();
    }

    public String getTag() {
        return tag;
    }

    public void setTag(String tag) {
        this.tag = tag == null ? null : tag.trim();
    }

    public Integer getTotal() {
        return total;
    }

    public void setTotal(Integer total) {
        this.total = total;
    }

    public BigDecimal getDiscount() {
        return discount;
    }

    public void setDiscount(BigDecimal discount) {
        this.discount = discount;
    }

    public BigDecimal getMin() {
        return min;
    }

    public void setMin(BigDecimal min) {
        this.min = min;
    }

    public Short getLimit() {
        return limit;
    }

    public void setLimit(Short limit) {
        this.limit = limit;
    }

    public Short getType() {
        return type;
    }

    public void setType(Short type) {
        this.type = type;
    }

    public Short getStatus() {
        return status;
    }

    public void setStatus(Short status) {
        this.status = status;
    }

    public Short getGoodsType() {
        return goodsType;
    }

    public void setGoodsType(Short goodsType) {
        this.goodsType = goodsType;
    }

    public String getGoodsValue() {
        return goodsValue;
    }

    public void setGoodsValue(String goodsValue) {
        this.goodsValue = goodsValue == null ? null : goodsValue.trim();
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code == null ? null : code.trim();
    }

    public Short getTimeType() {
        return timeType;
    }

    public void setTimeType(Short timeType) {
        this.timeType = timeType;
    }

    public Short getDays() {
        return days;
    }

    public void setDays(Short days) {
        this.days = days;
    }

    public Date getStartTime() {
        return startTime;
    }

    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }

    public Date getEndTime() {
        return endTime;
    }

    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    public Date getAddTime() {
        return addTime;
    }

    public void setAddTime(Date addTime) {
        this.addTime = addTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public Boolean getDeleted() {
        return deleted;
    }

    public void setDeleted(Boolean deleted) {
        this.deleted = deleted;
    }
}